/**
 * JavaScript パーツ
 */
function openLinkMenu(link_id) {
  var link_menu = document.getElementById(link_id);
  var invisible = link_menu.style.display == 'none';

  closeLinkMenu();

  if ( invisible ) {
    link_menu.style.display = '';
    link_menu.style.backgroundColor = '#dfecf5';
  }
};

function closeLinkMenu() {
<% COMMON_MENUS[:block_menus].each do |block_menu| %>
  document.getElementById('<%= block_menu[:id] -%>').style.display = 'none';
<% end %>
};

page_data = [
  '<style type="text/css">',
  'div#services a { color: blue; text-decoration: none; padding: 0 5px 2px 5px; }',
  'div#services a:hover { color: blue; background-color: yellow;}',
  'div#services img { vertical-align: middle; }',
  '</style>',

  '<div id="services" style="float: right; border: none; background-color: #dfecf5; margin: 0 0 0 5px; padding: 0 0 2px 10px; font-size: 12px">',

'<%= link_to icon_tag("door") + " ログインしなおす", "#{ENV['SKIP_URL']}/logout" -%>',

  '</div>',


  '<br style="clear: right;" />'
].join(' ');

document.write(page_data);

